<%@ page import="entity.hotel_employee" %>
<%@ page import="entity.hotel_tenant" %><%--
  Created by IntelliJ IDEA.
  User: a3502
  Date: 2022/4/28
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>退房操作</title>
    <link rel="stylesheet" href="/hotelSystem/layui/css/layui.css"  media="all">
</head>
<body>
<form class="layui-form" action="/hotelSystem/order/CheckOutController.do">
    <!-- 搜索框 -->
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="text" name="room_no" required lay-verify="required"
                   placeholder="请输入房间号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <!-- 搜索按钮 -->
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="submit" value="搜索" class="layui-btn layui-btn-radius layui-btn-normal" />
        </div>
    </div>
</form>
<%
    hotel_tenant hotel_tenant = (hotel_tenant)request.getAttribute("hotel_tenant");
    String checkOutTip = (String)request.getAttribute("checkOutTip");
    if(checkOutTip!=null){
%>
<h3><%=checkOutTip%></h3>
<%
}else
if(hotel_tenant!=null){
%>
<table class="layui-table">
    <colgroup>
        <col width="150">
        <col width="150">
        <col width="200">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>客人姓名</th>
        <th>客人性别</th>
        <th>客人身份证号</th>
        <th>客人电话</th>
        <th>入住房间号</th>
        <th>退房</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <th><%=hotel_tenant.getTenant_name() %></th>
        <th><%=hotel_tenant.getTenant_sex().equals("0")?"女":"男"%></th>
        <th><%=hotel_tenant.getTenant_id()%></th>
        <th><%=hotel_tenant.getTenant_tel()%></th>
        <th><%=hotel_tenant.getRoom_no()%></th>
        <th>
            <form action="CheckOutController.do">
                <input type="hidden" name="checkOutNo" value="<%=hotel_tenant.getRoom_no()%>">
                <input type="submit" value="退房" class="layui-btn layui-btn-normal layui-btn-sm">
            </form>
        </th>
    </tr>
    </tbody>
</table>
<%
    }
%>
<script src="/hotelSystem/layui/layui.js" charset="utf-8"></script>
</body>
</html>
